<template>
  <span> state > {{ state }} </span>
  <button @click="changeState">修改子组件中的state</button>
</template>

<script setup>
import { useGlobalState } from './store';

const state = useGlobalState();

function changeState() {
  state.value += 2;
  console.log(state);
}
</script>
